package com.zhilei.controller;

import com.zhilei.grace.result.GraceJSONResult;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 志磊
 */
@RestController
@RequestMapping("p")
public class HelloController {

    @Value("${spring.application.name}")
    private String applicationName;

    @GetMapping("hello")
    public GraceJSONResult getHello() {
        return GraceJSONResult.ok("hello, " + applicationName);
    }
}
